/****************************************************************************

 XDV Game Engine
 Copyright 2013 - Xavier Durand-Hollis, David Ward, Vitor Makoto Matayoshi
 
 XDVTransform.cpp - Created Jun 11, 2013 by Xavier

 ****************************************************************************/

#include "XDVTransform.h"

XDVTransform::XDVTransform() : XDVComponent("transform")
{
	m_position = new XDVVector3(0,0,0);
}
XDVTransform::XDVTransform(XDVVector3& position) : XDVComponent("transform")
{
	m_position = new XDVVector3(0,0,0);
	SetPosition(position);
}
XDVTransform::XDVTransform(std::string name) : XDVComponent(name)
{
	m_position = new XDVVector3(0,0,0);
}
XDVTransform::XDVTransform(std::string name, XDVVector3& position) : XDVComponent(name)
{
	m_position = new XDVVector3(0,0,0);
	SetPosition(position);
}
XDVTransform::~XDVTransform()
{
	delete m_position;
}

void XDVTransform::SetPosition(XDVVector3& position)
{
	m_position->x = position.x;
	m_position->y = position.y;
	m_position->z = position.z;
}
void XDVTransform::SetPosition(float x, float y, float z)
{
	m_position->x = x;
	m_position->y = y;
	m_position->z = z;
}
XDVVector3 XDVTransform::GetPosition()
{
	return XDVVector3(m_position->x, m_position->y, m_position->z);
}
